import React, { Component } from 'react';
import { Link } from 'react-router-dom'
import './MenuList.scss';


const  MENU_ITEMS={

	"Home":[
	{title:'用车申请',type:'1-1',minTit:'填写信息，进行派车',icon:1,routeName:'/apply'},
  {title:'我的用车',type:'1-2',minTit:'用车情况，一键查看',icon:2,routeName:'/CommonList'},
	// {title:'我的费用',minTit:'用车费用，轻松掌握',icon:3,routeName:''},
	{title:'我的评价',type:'1-4',minTit:'我们进步，与您同步',icon:4,routeName:'/CommonList'}
	],
	"Handle":[
		{title:'受理',minTit:'认真细致，服务大众',icon:1,routeName:'HandleList'},
	],
	"Dispatch":[
			{title:'我的调度',minTit:'知你所需，轻松调度',icon:1,routeName:'DispatchList'},
			{title:'我的派车',minTit:'知你所需，轻松派单',icon:2,routeName:'DriveList'},
			{title:'归队登记',minTit:'不管在哪，轻松归队',icon:3,routeName:'RejoinList'},
			{title:'派车登记表',minTit:'汽车司机，轻松了解',icon:4,routeName:''}
			],
 "Drive":[
				{title:'任务列表',minTit:'任务管理，无需过错',icon:1,routeName:'TaskList'},
				{title:'事故上报',minTit:'途中意外，轻松解决',icon:2,routeName:''},
				{title:'车况上报',minTit:'车辆状况，一键上报',icon:3,routeName:''},
	 ],
};

class MenuList extends Component {
	constructor(props){
   	super(props)
	}
 
  render() {

    return (
      <div className="content">

          {MENU_ITEMS[this.props.selectActive].map((item,index)=>{
					 return<Link tag="div"  to={`${item.routeName}/${item.type}`} className="list" key={index}>
           		<div className="left-bg list-bg">
           				<a  href="javascript:;" className={"icon_"+item.icon}></a>
           		</div>
           		<div className="list-content">
           				<div className="font-top">{item.title}</div>
           				<div className="font-bottom">{item.minTit}</div>
           		</div>
           		<div className="right-bg list-bg">
           				<span></span>
           		</div>
					  </Link>})} 
           
      </div>
    );
  }
}

export default MenuList;